package com.serkiri.binder;

import com.serkiri.stuff.HotelsSrpPage;
import com.serkiri.stuff.SrpPage;

public class Binder {
    
 
    
    public static <T> T getInstance(Class<T> classClass){
        try {
            if (classClass == SrpPage.class){
                return (T)HotelsSrpPage.class.newInstance();
            }
            return classClass.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

}
